alias dlg_control {
  dialog -ma dlg_control dlg_control_table
}

dialog dlg_control_table {
  title "Revolution Control"
  size -1 -1 490 290
}

on *:dialog:dlg_control:*:*: {
  if ($devent == init) {
    dcx Mark $dname dlg_control_cb
    xdialog -b $dname +ty

    ;// Call initilisation alias
    dlg_control_init_dcx
  }
}

alias -l dlg_control_init_dcx {
  ;// Initialising control: League Options (Button 3)
  xdialog -c $dname 3 button 370 45 100 20 tabstop
  xdid -t $dname 3 League Options
  xdid -T $dname 3 Tooltip text here

  ;// Initialising control: Bot Settings (Button 1)
  xdialog -c $dname 1 button 370 21 100 20 tabstop
  xdid -t $dname 1 Bot Settings
  xdid -T $dname 1 Tooltip text here

  ;// Initialising control: EXIT CONTROL PANEL (Button 2)
  xdialog -c $dname 2 button 5 263 480 20 tabstop default
  xdid -t $dname 2 EXIT CONTROL PANEL
  xdid -T $dname 2 Tooltip text here

}

;// Callback alias for dlg_control
alias dlg_control_cb {
  if ($2 != mouse) {
    echo $color(info) -s */ dlg_control_cb: $1-
  }
}

;// quick-access menu item
menu status,channel {
  dlg_control : dlg_control
}
